load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "logmetrics",
    srcs = ["metrics.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/util/log/logmetrics",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/util/log",
        "//pkg/util/metric",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_prometheus_client_model//go",
    ],
)

go_test(
    name = "logmetrics_test",
    srcs = ["metrics_test.go"],
    embed = [":logmetrics"],
    deps = [
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "@com_github_stretchr_testify//require",
    ],
)
